<!DOCTYPE HTML>
<html>

<head>
		<title>Mensajer&iacutea</title>
	<body>
	    <header>
			<h1 align="center">&nbsp;</h1>
			<h1 align="center">Clientes registrados</h1>
		</header>
        
        <script src="media/js/jquery.js"></script>
		<script src="media/js/jquery.dataTables.js"></script>
        <link rel="stylesheet" type="text/css" href="media/css/demo_table.css">
        <link rel="stylesheet" type="text/css" href="media/css/jquery.dataTables_themeroller.css">
        
        <script type="text/javascript" charset="utf-8">
			$(document).ready(function() {
                $('#datatables').dataTable();
            })
		</script>
		
   	<div>
    	<div>
        	<div>
                
        <p>&nbsp;</p>
	        	<p>&nbsp;</p>
                    
                    <table id="datatables">
                      <thead>
                            <?php
                            include('conn/conn.php');  
                            echo "<tr>"; 
                            echo "<th>Tel&eacute;fono</th>"; 
                            echo "<th>Nombre</th>"; 
                            echo "<th>Apellido</th>"; 
                            echo "<th>Direcci&oacute;n</th>"; 
                            echo "<th>Opcion 1</th>"; 
                            echo "<th>Opcion 2</th>";					
                            echo "</tr>"; 
                            ?>
                      </thead>
                      
                          <tbody>
                                <?php
                                $result = mysql_query("SELECT * FROM `clientes`") or trigger_error(mysql_error());
                                while($row = mysql_fetch_array($result))
                                {
                                    echo "</tr>";
                                    echo "<td valign='top'>". nl2br( $row['Tel']) .  "</td>";
                                    echo "<td valign='top'>" . nl2br( $row['Nombre']) . "</td>";
                                    echo "<td valign='top'>" . nl2br( $row['Apellido1']) . "</td>";
                                    echo "<td valign='top'>" . nl2br( $row['Direccion']) . "</td>";                                        echo "<td valign='top'><a href=../modificar/modificaCliente.php?Tel={$row['Tel']} >Modificar</a></td>
                                    <td><a href=../eliminar/eliminarCliente.php?PKCli={$row['Tel']}>Eliminar</a></td>						"; 	
                                }
                                
                                mysql_close($link);
                                ?>
                          </tbody>
                    </table>
                		<p>&nbsp;</p>
					</div>	
                    <p>&nbsp;</p>
			</div>

        </div>
</body>
</html>